package nl.hva.three2learn.dao;

import java.util.Date;
import java.util.List;

import nl.hva.three2learn.model.Message;
import nl.hva.three2learn.model.User;

public interface MessageDao {

	List<Message> findBySenderAndReceiver(User sender, User receiver);
	
	/**
	 * Retrieves all the messages that were send by the user identified by
	 * <code>senderId</code> to the user <code>receiverId</code>
	 * starting from the given date <code>start</code>.
	 * @param userId The user to retrieve the messages for
	 * @param start The date to start from
	 * @return
	 */
	List<Message> findByStartDate(long senderId, long receiverId, Date start);
	
	/**
	 * Saves the given message
	 * @param message
	 */
	void save(Message message);
	
}
